package com.itheima.Demo3Stream;

import java.util.*;
import java.util.stream.Stream;

public class StreamDemo2
{
    public static void main(String[] args) {
        List<String> list=new ArrayList<>();
        Stream<String> stream = list.stream();
        //map集合的stream流
        Map<String,Integer> map=new HashMap<>();
        Stream< String> stream1 = map.keySet().stream();
        Stream< Integer> stream2 = map.values().stream();
        Stream< Map.Entry<String, Integer>> stream3 = map.entrySet().stream();
        //获取数组的流
        String[] arr={"张三","李四","王五"};
        Stream<String> stream4 = Arrays.stream(arr);
        System.out.println(stream4.count());
        Stream.of("张三","李四","王五");
    }
}
